package com.smrs.asn.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.jof.framework.dao.hibernate.BaseDAOHibernateImpl;
import com.jof.framework.util.Pager;
import com.smrs.asn.dao.AsnDetailDao;
import com.smrs.asn.model.AsnDetailModel;
import com.smrs.asn.model.AsnHeaderModel;
import com.smrs.goods.model.GoodsSkuModel;
import com.smrs.service.BaseService;

@Component(value="asnDetailService")
public class AsnDetailService extends BaseService<AsnDetailModel,Long>{
	@Autowired
	private AsnDetailDao asnDetailDao ;

	public Pager<AsnDetailModel> getByNameLikePager(String name, Pager<AsnDetailModel> pager){
		return asnDetailDao.getByNameLikePager(name,pager);
		
	}
	
	public Pager<AsnDetailModel> findBySkuAndAsnHeader(GoodsSkuModel sku,AsnHeaderModel asnHeader,Pager<AsnDetailModel> pager){
		//List<AsnDetailModel> list =
		Pager<AsnDetailModel> tempPager =  asnDetailDao.findBySkuAndAsnHeader(sku,asnHeader,pager);
		return tempPager;
	}
	
	public List<AsnDetailModel> findByAsnHeader(AsnHeaderModel asnHeader){
		List<AsnDetailModel>  list = asnDetailDao.findByAsnHeader(asnHeader);
		return list;
	}
	
	@Override
	public BaseDAOHibernateImpl<AsnDetailModel, Long> getPerformDao() {		
		return asnDetailDao;
	}


	
	
}
